package mysql

import "gorm.io/gorm"

type Doctor struct {
	gorm.Model
	DoctorCode string `gorm:"type:varchar(100)"`
	Password   string `gorm:"type:varchar(100)"`
}

func (d *Doctor) FindDoctorByCode(db *gorm.DB, code string) error {
	return db.Debug().Where("doctor_code=?", code).First(d).Error
}
